/*
 *  Copyright 2008-2010 www.jrails.org
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package org.rails.extjs.chart;

import org.rails.extjs.BoxComponent;
import org.rails.extjs.Option;

public abstract class FlashComponent extends BoxComponent {

	public FlashComponent() {
		super();
	}

	public FlashComponent(Option configOptions) {
		super(configOptions);
	}

	public FlashComponent(String id) {
		super(id);
	}

	public void setBackgroundColor(String backgroundColor) {
		addOption("backgroundColor", backgroundColor);
	}

	public String getBackgroundColor() {
		return getString("backgroundColor", "#ffffff");
	}

	public void setExpressInstall(Boolean expressInstall) {
		addOption("expressInstall", expressInstall);
	}

	public Boolean isExpressInstall() {
		return getBoolean("expressInstall", false);
	}
	
    public void setFlashParams(Option flashParams){
    	addOption("flashParams", flashParams);
    }
    
    public Option getFlashParams(){
    	return (Option)getOption("flashParams");
    }
    
    public void setFlashVars(Option flashVars){
    	addOption("flashVars", flashVars);
    }
    
    public Option getFlashVars(){
    	return (Option)getOption("flashVars");
    }
    
	public void setFlashVersion(String flashVersion) {
		addOption("flashVersion", flashVersion);
	}

	public String getFlashVersion() {
		return getString("flashVersion", "9.0.45");
	}
	public void setUrl(String url) {
		addOption("url", url);
	}

	public String getUrl() {
		return getString("url", "");
	}
	
	public void setWmode(String wmode) {
		addOption("wmode", wmode);
	}

	public String getWmode() {
		return getString("wmode", "opaque");
	}
}
